package net.valerijtimakov.homefinances.domain.common;

public class NamedItem extends DataItem {
	
	private static final long serialVersionUID = 1L;
	
	private String name = "";
	private String description = "";
	
	public NamedItem() {
		super();
	}

	public NamedItem(long id, String name) {
		super(id);
		setName(name);
	}

	public String getName() {
		return name;
	}

	public final void setName(String name) {
		this.name = checkNull(name);
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = checkNull(description);
	}

	@Override
	public String toString() {
		return "name=" + name + "," + "description=" + description + "," + super.toString();
	}

}
